<?php

if($login_username=="") {
	$menuLoginLabel = "Login";
	$menuLoginHref = "index.php?page=login";	
} else {
	$menuLoginLabel = "Logout";
	$menuLoginHref = "process.php?action=logout";	
}

?>

<div style="padding-left:25px;padding-top:18px;">
	<div class="sdmenu">

		<!-- GENERAL -->
		
		<span class="title" id="top">
			<img src="includes/smenu/expanded.gif" class="arrow" alt="-" />
			General
		</span>
		<div class="submenu">
			<a href="index.php?page=default">Home</a>
			<a href="<?=$menuLoginHref;?>"><?=$menuLoginLabel;?></a>
		</div>

		<!-- METRICS -->

		<? if($login_level>=10) { ?> 

		<span class="title">
			<img src="includes/smenu/expanded.gif" class="arrow" alt="-" />
			Metrics
		</span>
		<div class="submenu">
			<a href="index.php?page=form">New Entry</a>
		</div>
		
		<? } ?>

		<!-- REPORTS -->
		
		<? if($login_level>=50) { ?> 
		
		<span class="title">
			<img src="includes/smenu/expanded.gif" class="arrow" alt="-" />
			Reports
		</span>
		<div class="submenu">
			<a target="_blank" href="report.php?report=esso">Esso Analysis</a>
		</div>
		
		<? } ?>
		
		<!-- ADMINISTRATION -->

		<? if($login_level>=100) { ?> 
		
		<span class="title">
			<img src="includes/smenu/expanded.gif" class="arrow" alt="-" />
			Administration
		</span>
		<div class="submenu">
			<a href="">Edit Users</a>
			<a href="">Edit Teams</a>
			<a href="">Edit Fields</a>
		</div>

		<? } ?>
		
	</div>
</div>